export const userStore = defineStore(
  "userStore",
  () => {
    const token = ref("");
    const getToken = () => {
      return token.value;
    };
    const setToken = (newToken: string) => {
      token.value = newToken;
    };

    return { getToken, setToken };
  },
  {
    persist: {
      storage: piniaPluginPersistedstate.localStorage(), // 开启pinia持久化插件，存在localStorage中
    },
  },
);
